﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DBUtility;
using System.Windows.Forms;


namespace List
{
    class BreakList
    {
        public static void Brakelist(string str, ComboBox comboBox)
        {
            string SQL = "select Node_id from treelist where ID=(select ID from peo_info where PeoId='" + str + "')";
            Object obj = DbHelperSQL.GetSingle(SQL);
            switch (Convert.ToString(obj))
            {
                case "0":
                    {
                        string sql = "select Name from treelist";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "10":
                    {
                        string sql = "select Name from treelist where Node_id like '10%'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "1010":
                    {
                        string sql = "select Name from treelist where Node_id like '1010%'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "10101":
                    {
                        string sql = "select Name from treelist where Node_id='10101'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "1020":
                    {
                        string sql = "select Name from treelist where Node_id like '1020%'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "10201":
                    {
                        string sql = "select Name from treelist where Node_id='10201'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "10202":
                    {
                        string sql = "select Name from treelist where Node_id='10202'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;

                case "1030":
                    {
                        string sql = "select Name from treelist where Node_id like '1030%'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "10301":
                    {
                        string sql = "select Name from treelist where Node_id='10301'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "10302":
                    {
                        string sql = "select Name from treelist where Node_id='10302'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "1040":
                    {
                        string sql = "select Name from treelist where Node_id like '1040%'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "10401":
                    {
                        string sql = "select Name from treelist where Node_id='10401'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "1050":
                    {
                        string sql = "select Name from treelist where Node_id like '1050%'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "10501":
                    {
                        string sql = "select Name from treelist where Node_id='10501'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;

                case "1060":
                    {
                        string sql = "select Name from treelist where Node_id like '1060%'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "10601":
                    {
                        string sql = "select Name from treelist where Node_id='10601'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "10602":
                    {
                        string sql = "select Name from treelist where Node_id='10602'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "20":
                    {
                        string sql = "select Name from treelist where Node_id like '20%'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "2010":
                    {
                        string sql = "select Name from treelist where Node_id like '2010%'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "20101":
                    {
                        string sql = "select Name from treelist where Node_id='20101'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "2020":
                    {
                        string sql = "select Name from treelist where Node_id like '2020%'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "20201":
                    {
                        string sql = "select Name from treelist where Node_id='20201'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "2030":
                    {
                        string sql = "select Name from treelist where Node_id like '2030%'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "20301":
                    {
                        string sql = "select Name from treelist where Node_id='20301'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "20302":
                    {
                        string sql = "select Name from treelist where Node_id='20302'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "20303":
                    {
                        string sql = "select Name from treelist where Node_id='20303'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "20304":
                    {
                        string sql = "select Name from treelist where Node_id='20304'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "2040":
                    {
                        string sql = "select Name from treelist where Node_id like '2040%'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "20401":
                    {
                        string sql = "select Name from treelist where Node_id='20401'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "2050":
                    {
                        string sql = "select Name from treelist where Node_id like '2050%'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "20501":
                    {
                        string sql = "select Name from treelist where Node_id='20501'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "20502":
                    {
                        string sql = "select Name from treelist where Node_id='20502'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "20503":
                    {
                        string sql = "select Name from treelist where Node_id='20503'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "2060":
                    {
                        string sql = "select Name from treelist where Node_id like '2060%'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "20601":
                    {
                        string sql = "select Name from treelist where Node_id='20601'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "2070":
                    {
                        string sql = "select Name from treelist where Node_id like '2070%'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "20701":
                    {
                        string sql = "select Name from treelist where Node_id='20701'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "20702":
                    {
                        string sql = "select Name from treelist where Node_id='20702'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "20703":
                    {
                        string sql = "select Name from treelist where Node_id='20703'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "20704":
                    {
                        string sql = "select Name from treelist where Node_id='20704'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;

                case "2080":
                    {
                        string sql = "select Name from treelist where Node_id like '2080%'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "20801":
                    {
                        string sql = "select Name from treelist where Node_id='20801'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "2090":
                    {
                        string sql = "select Name from treelist where Node_id like '2090%'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "20901":
                    {
                        string sql = "select Name from treelist where Node_id='20901'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "20902":
                    {
                        string sql = "select Name from treelist where Node_id='20902'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "20903":
                    {
                        string sql = "select Name from treelist where Node_id='20903'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "2100":
                    {
                        string sql = "select Name from treelist where Node_id like '2100%'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "21001":
                    {
                        string sql = "select Name from treelist where Node_id='21001'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "21002":
                    {
                        string sql = "select Name from treelist where Node_id='21002'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
                case "21003":
                    {
                        string sql = "select Name from treelist where Node_id='21003'";
                        comboBox.DataSource = DbHelperSQL.GetDataTable(sql);
                        comboBox.DisplayMember = "Name";
                    }
                    break;
            }
        }
    }
}

